# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
vespa_add_executable(vespamalloc_creatingmanythreads_test_app
    SOURCES
    creatingmanythreads.cpp
)
vespa_add_executable(vespamalloc_allocfree_shared_test_app
    SOURCES
    allocfree.cpp
    producerconsumer.cpp
)
vespa_add_executable(vespamalloc_realloc_test_app
    SOURCES
    realloc.cpp
)
vespa_add_executable(vespamalloc_linklist_test_app
    SOURCES
    linklist.cpp
    producerconsumer.cpp
    ../../vespamalloc/malloc/allocchunk.cpp
    ../../vespamalloc/malloc/common.cpp
    $<TARGET_OBJECTS:vespamalloc_util>
    DEPENDS
    dl
    atomic
)
vespa_add_test(NAME vespamalloc_allocfree_shared_test_app NO_VALGRIND COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/allocfree_test.sh BENCHMARK
               DEPENDS vespamalloc_realloc_test_app vespamalloc_allocfree_shared_test_app vespamalloc_linklist_test_app
                       vespamalloc vespamallocd)
